Universal Access To All Knowledge
Home Donate | Store | Blog | FAQ | Jobs | Volunteer Positions | Contact | Bios | Forums | Projects | Terms, Privacy, & Copyright
Search: Advanced Search
Anonymous User (login or join us)
Upload

JSON API for archive.org services and metadata

We have been moving the majority of our services from formats like XML, OAI and other to the more modern JSON format and method of client/server interaction.

As we do not have unlimited resources behind our services, we request that users try to cache results where they can for the more high traffic and popular installations/uses. 8-)

Each service shares the standard web practice of returning JSON via adding CGI parameter: and can be used directly in an offsite javascript webpage by adding a callback parameter:

We provide the following services in JSON output:
Search Results:
You can use this form to setup a query to our search engine. You may pick what kinds of information you would like returned, how the results should be sorted, and how many results to return. Example query.
An Individual Item's extended Metadata:
Our "/details/" pages that we show for every item on our site use their metadata on the back-end to make the HTML displayed in your browser. You can make any item's details page output JSON by adding "&output=json".
Example item's metadata in JSON
Top Level Page:
You can access much of the displayed information on the main archive.org page by changing its output mode to use JSON.
User Bookmarks:
You can show your own bookmarks or those of another user.

Putting it all together -- an example

You can string multiple JSON requests to archive.org services to make a very complete version or "view" of our site anywhere on the web!
Example HTML:
<html> <head> <script type="text/javascript" src="http://archive.org/help/example.js"></script> <script type="text/javascript" src="http://archive.org/index.php?output=json&callback=IAE.topfn"></script> <script type="text/javascript" src="http://archive.org/advancedsearch.php?q=bunny+AND+licenseurl:[http://creativecommons.org/a+TO+http://creativecommons.org/z]&fl[]=identifier,title,mediatype,collection&rows=15&output=json&callback=IAE.search_hits"></script> <script type="text/javascript" src="http://archive.org/details/FrankenberryCountChoculaTevevisionCommercial1971&output=json&callback=IAE.favorite"></script> </head> <body onload="IAE.drawit()"> </body> </html>
You can see it shown here. It uses this javascript to draw the page from the JSON results.